package com.wntms.zjy.service.impl;

import com.github.pagehelper.PageHelper;
import com.wntms.zjy.dao.FreightContractDaoz;
import com.wntms.zjy.pojo.FreightContract;
import com.wntms.zjy.service.FreightContractService1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xzbz
 * @create 2022-11-27 23:04
 */
@Service
public class FreightContractServiceImpl1 implements FreightContractService1 {
    @Autowired
    private FreightContractDaoz freightContractDaoz;
    @Override
    public List<FreightContract> findByPage(Integer currentPage, Integer pageSize) {
        PageHelper.startPage(currentPage,pageSize);

        List<FreightContract> freightContracts = freightContractDaoz.findAll();
        return freightContracts;
    }

    @Override
    public List<FreightContract> findAll() {
        List<FreightContract> freightContracts = freightContractDaoz.findAll();
        return freightContracts;
    }

    @Override
    public FreightContract findById(String fid) {
        FreightContract freightContract = freightContractDaoz.findById(fid);
        return freightContract;
    }

    @Override
    public Integer findCount() {
        return freightContractDaoz.findCount();
    }


}
